<include target="include.header.html" />

<div class="form requestPackage">

    <h3>{$lang->cmd_modify_package}</h3>
    <p class="information">{$lang->about_modify_package}</p>
    <p class="reference">(<em><img src="./img/bu_must.gif" alt="{$required_field}" /></em>) {$lang->about_required_field}</p>
    
	<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/resource/skins/xe_official/modifypackage/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
		<p>{$XE_VALIDATOR_MESSAGE}</p>
	</div>
	
    <form action="./" method="post" ruleset="modifyPackage">
    <input type="hidden" name="act" value="procResourceModifyPackage" />
    <input type="hidden" name="vid" value="{$vid}" />
    <input type="hidden" name="mid" value="{$mid}" />
    <input type="hidden" name="package_srl" value="{$selected_package->package_srl}" />
    <input type="hidden" name="xe_validator_id" value="modules/resource/skins/xe_official/modifypackage/1" />
    <fieldset>
        <legend>{$lang->cmd_modify_package}</legend>

            <table class="form">
            <tr>
                <th scope="row"><em>{$lang->package_title}<img src="./img/bu_must.gif" alt="{$required_field}" /></em></th>
                <td>
                    <p><input type="text" name="title" class="text_field" value="{htmlspecialchars($selected_package->title)}" /></p>
                    <p class="description">{$lang->about_package_title}</p>
                </td>
            </tr>
            <!--@if($grant->manager)-->
            <tr>
                <th scope="row"><em>{$lang->package_category}<img src="./img/bu_must.gif" alt="{$required_field}" /></em></th>
                <td>
                    <p>
                        <select name="package_category">
                        {@ $_curDepth = 0; }
                        <!--@foreach($categories as $key => $val)-->
                            <!--@if($val->depth<$_curDepth)-->
                            </optgroup>
                            <!--@end-->
                            <!--@if($val->depth<1)-->
                            <!--@if($val->child_count>0)-->
                            <optgroup label="{$val->title}">
                            <!--@else-->
                            <option value="{$val->category_srl}" <!--@if($selected_package->category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
                            <!--@end-->
                            <!--@end-->
                            <!--@if($val->depth>0)-->
                                <option value="{$val->category_srl}" <!--@if($selected_package->category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
                            <!--@end-->
                            {@ $_curDepth = $val->depth}
                        <!--@end-->
                        <!--@for($i=0;$i<$_curDepth;$i++)--></optgroup><!--@end-->
                        </select>
                    </p>
                    <p class="description">{$lang->about_package_title}</p>
                </td>
            </tr>
            <!--@end-->
            <tr>
                <th scope="row"><em>{$lang->package_license}<img src="./img/bu_must.gif" alt="{$required_field}"/></em></th>
                <td>
                    <p>
                        <select name="license">
                            <!--@foreach($licenses as $key => $val)-->
                            <option value="{$val}" <!--@if($val==$selected_package->licenses)-->selected="selected"<!--@end-->>{$val}</option>
                            <!--@end-->
                        </select>
                    </p>
                    <p class="description">{$lang->about_package_license}</p>
                </td>
            </tr>
            <!--@if($module_info->resource_use_path=='Y')-->
            <tr>
                <th scope="row"><em>{$lang->package_path}<img src="./img/bu_must.gif" alt="{$required_field}"/></em></th>
                <td>
                    <p><input type="text" name="path" class="text_field" value="{htmlspecialchars($selected_package->path)}"/></p>
                    <p class="description">{$lang->about_package_path}</p>
                </td>
            </tr>
            <!--@end-->
            <tr>
                <th scope="row"><em>{$lang->package_homepage}<img src="./img/bu_must.gif" alt="{$required_field}" /></em></th>
                <td>
                    <p><input type="text" name="homepage" class="text_field"  value="{htmlspecialchars($selected_package->homepage)}" /></p>
                    <p class="description">{$lang->about_package_homepage}</p>
                </td>
            </tr>
            <tr class="last_child">
                <th scope="row"><em>{$lang->package_description}<img src="./img/bu_must.gif" alt="{$required_field}" /></em></th>
                <td>
                    <p><textarea name="description" class="text_area">{htmlspecialchars($selected_package->description)}</textarea></p>
                    <p class="description">{$lang->about_package_description}</p>
                </td>
            </tr>
            </table>
        </fieldset>

        <div class="btnArea">
            <a href="{getUrl('act','dispResourcePackage')}" class="btn" style="float:left">{$lang->cmd_back}</a>
            <input type="submit" value="{$lang->cmd_save}" class="btn btn-inverse" />
        </div>
    </form>
</div>



<include target="include.footer.html" />
